﻿using CID.Domain.Infrastructure;
using CID.Domain.Users;
using CID.Web.Models.Infrastructure;
using CID.Web.Support;

namespace CID.Web.Controllers
{
    [CIDAuthorize(UserRole.Architect, UserRole.Manager)]
    public class PackageTypeController : BaseCRUDController<IPackageType, PackageType, PackageTypeViewModel>
    {
        protected override PackageType CreateModel(PackageTypeViewModel viewModel)
        {
            return new PackageType(viewModel.Name, viewModel.Description);
        }
    }
}
